<?php
$url_logo = BUtils::GetPictureUrl(Yii::app()->user->logo);
?>
<div style="position:relative;height:140px;">
	<img src="<?php echo $url_logo; ?>" style="width:64px;position:absolute;top:8px;right:8px;" alt="" />
	<p style="position:absolute;top:24px;left:0;">
		<span style="font-size:22px;"><?php echo Yii::app()->user->name; ?></span>
		<br /><br />
		<span style="font-size:17px;"><i><?php echo strip_tags($program['caption']); ?></i></span>
		<br /><br /><br />
	</p>
</div>
<table border="0" style="width:86%;margin:0 auto;padding:0;">
<?php foreach ($rows as $r) {
	//set the description as default
	$description = trim($r['description']);
	if (empty($description)) {
		$description = BUtils::T('points_for_rewards', array('{pts}' => $r['required_points']));
	} else $description = strip_tags($description);	
?>
<tr style="">
	<td style="padding:0;height:64px;width:64px;text-align:center;font-size:24px;vertical-align:middle; background:#f6c75f;border-radius:32px;">
		<?php echo $r['required_points']; ?>
	</td>
	<td style="padding-left:15px;vertical-align:middle;">
		<div style="font-size:18px;line-height:28px;color:#333;"><?php echo strip_tags($r['title']); ?></div>
		<div style="font-size:14px;line-height:16px;color:#666;"><i><?php echo $description; ?></i></div>
	</td>
</tr>
<tr>
	<td colspan="2" style="height:8px;"></td>
</tr>
<tr>
	<td colspan="2" style="border-top:2px dotted #aaa;height:8px;"></td>
</tr>
<?php } ?>
</table>
<?php if (!empty($program['terms'])) { ?>
<div style="padding:24px 0 0 0;">
	<div style="font-size:16px;line-height:28px;color:#666">
		<?php echo BUtils::T('terms_conditions_lbl'); ?>
	</div>
	<div style="font-size:13px;line-height:28px;color:#666">
		<?php echo strip_tags($program['terms']); ?>
	</div>
</div>
<?php } ?>